<html>
<head><meta charset="utf-8"><title>Should we depreciate the use of Python2 to build rustc? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html">Should we depreciate the use of Python2 to build rustc?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227380654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20we%20depreciate%20the%20use%20of%20Python2%20to%20build%20rustc%3F/near/227380654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Henry Boisdequin <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html#227380654">(Feb 23 2021 at 04:20)</a>:</h4>
<p>As python2 is <a href="https://www.python.org/doc/sunset-python-2/">no longer supported</a> and we are approaching python4, I think that we should move towards python3. Python2 is no longer maintained and could bring bugs to rustc if used. Even though Rust is about compatibility, the Python team highly recommends deprecating python2 since it's no longer maintained and security/general bug reports will not be looked at. Additionally, if rustc wanted to use python3 only features/python3 only packages, this would break when using python2.</p>
<p>From the Python <a href="https://www.python.org/doc/sunset-python-2/">"Sunset Python 2"</a> blog post:</p>
<blockquote>
<p><strong>What will happen if I did not upgrade by January 1st, 2020?</strong></p>
<p>If people find catastrophic security problems in Python 2, or in software written in Python 2, then most volunteers will not help fix them. If you need help with Python 2 software, then many volunteers will not help you, and over time fewer and fewer volunteers will be able to help you. You will lose chances to use good tools because they will only run on Python 3, and you will slow down people who depend on you and work with you.<br>
Some of these problems started on January 1. Other problems will grow over time.</p>
</blockquote>
<p>Should we depreciate the use of Python2 to build rustc and enforce the use of Python3?</p>
<p>Related: <a href="https://github.com/rust-lang/rust/issues/71818">#71818</a><br>
Context: <a href="https://github.com/rust-lang/rust/issues/82433">#82433</a></p>



<a name="227382977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20we%20depreciate%20the%20use%20of%20Python2%20to%20build%20rustc%3F/near/227382977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html#227382977">(Feb 23 2021 at 05:01)</a>:</h4>
<blockquote>
<p>we are approaching python4</p>
</blockquote>
<p>We are? I haven't heard anything about python4.</p>
<blockquote>
<p>if rustc wanted to use python3 only features/python3 only packages, this would break when using python2.</p>
</blockquote>
<p>bootstrap.py doesn't use any dependencies that aren't in the standard library (and personally I would want to move anything that complicated into rustbuild before having it in bootstrap.py). I agree it would be nice not to have to make things work with python2 though.</p>
<blockquote>
<p>could bring bugs to rustc if used</p>
</blockquote>
<p>I don't really understand why that requires <em>forcing</em> people not to use python2, though. If people care, they can change the default <code>python</code> on their machine to python3.</p>
<p>cc <span class="user-mention" data-user-id="116122">@simulacrum</span>, this is a follow-up to <a href="https://github.com/rust-lang/rust/issues/71818#issuecomment-623107875">https://github.com/rust-lang/rust/issues/71818#issuecomment-623107875</a></p>



<a name="227410851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20we%20depreciate%20the%20use%20of%20Python2%20to%20build%20rustc%3F/near/227410851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html#227410851">(Feb 23 2021 at 10:47)</a>:</h4>
<p>It was attempted in <a href="https://github.com/rust-lang/rust/pull/81451">https://github.com/rust-lang/rust/pull/81451</a></p>



<a name="227413692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20we%20depreciate%20the%20use%20of%20Python2%20to%20build%20rustc%3F/near/227413692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html#227413692">(Feb 23 2021 at 11:11)</a>:</h4>
<p>Yeah I personally still think it's too early, pain of supporting both doesn't seem too high to me personally</p>



<a name="227609440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Should%20we%20depreciate%20the%20use%20of%20Python2%20to%20build%20rustc%3F/near/227609440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Should.20we.20depreciate.20the.20use.20of.20Python2.20to.20build.20rustc.3F.html#227609440">(Feb 24 2021 at 14:50)</a>:</h4>
<p>IIRC LLVM's reliance on python is only in the test suite, at least according to <a href="https://llvm.org/docs/GettingStarted.html#software">https://llvm.org/docs/GettingStarted.html#software</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>